package com.imti.mall.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.imti.mall.model.pms.pojo.PmsProductAttributeCategory;
import com.imti.mall.model.pms.vo.ProductAttrCate;
import com.imti.mall.product.mapper.PmsProductAttributeCategoryDynaSqlProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.UpdateProvider;

import java.util.List;

/**
 * ClassName: PmsProductAttributeCategoryDao
 * Description:
 * date: 2022/9/13 13:49
 *
 * @author: youhun
 * @version:
 * @since JDK 1.8
 */
@Mapper
public interface PmsProductAttributeCategoryDao extends BaseMapper<PmsProductAttributeCategory> {

    /**
     * 动态SQl修改商品属性分类表
     * @param pmsProductAttributeCategory
     * @return
     */
    @UpdateProvider(type = PmsProductAttributeCategoryDynaSqlProvider.class ,method ="UpdatePmsProductAttributeCategoryById" )
    public boolean UpdatePmsProductAttributeCategoryById(PmsProductAttributeCategory pmsProductAttributeCategory);

    @Select(" SELECT id,NAME FROM pms_product_attribute_category ")
    public List<ProductAttrCate> findPmsProductAttributeCategoryToID();

}
